package site.luojie.ssm.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import site.luojie.ssm.domain.Account;
import site.luojie.ssm.service.AccountService;

import java.util.List;

/**
 * @Description:
 * @Author jie.luo
 * @Create: 2020-05-18 08:55
 **/
@Controller
@RequestMapping("/account")
public class AccountController {

    @Autowired
    private AccountService accountService;

    @RequestMapping("/queryAll")
    @ResponseBody
    public List<Account> queryAll() throws Exception {
        List<Account> accounts = accountService.queryAccountList();
        return accounts;
    }

}
